package com.rika.service.impl;

import com.rika.dao.CustomerDao;
import com.rika.pojo.Customer;
import com.rika.service.CustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerDao customerDao;
    @Override
    public List<Customer> selectCustomer(Map<String, Object> params) {
        return customerDao.selectCustomer(params);
    }

    @Override
    public Integer countAll() {
        return customerDao.countAll();
    }

    @Override
    public void addCustomer(Customer customer) {
        customerDao.addCustomer(customer);
    }

    @Override
    public void deleteCustomer(String customerCode) {
        customerDao.deleteCustomer(customerCode);
    }

    @Override
    public Customer selectByCustomerCode(String customerCode) {
        return customerDao.selectByCustomerCode(customerCode);
    }

    @Override
    public void updateCustomer(Customer customer) {
        customerDao.updateCustomer(customer);
    }

    @Override
    public List<Customer> selectAllCustomerForPo() {
        return customerDao.selectAllCustomerForPo();
    }

    @Override
    public List<Customer> selectCustomerByName(String name) {
        return customerDao.selectCustomerByName(name);
    }
}
